package com.zsy.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.zsy.service.BBSService;

public class AllBbsConf extends HttpServlet {

	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		HttpSession sess = req.getSession();
		try {
			BBSService bbss = new BBSService();
			List list = bbss.getAllSite();
			List bbsList = bbss.getParseBBSConfigList();
			sess.setAttribute("sitelist", list);
			sess.setAttribute("bbslist", bbsList);
			resp.sendRedirect(req.getContextPath()+"/web/bbsParse.jsp");
		} catch (Exception e) {
			e.printStackTrace();
			resp.sendRedirect(req.getContextPath()+"/web/bbsParse.jsp");
		}
	}
}
